<template>
  <div>
    <el-form ref="form" :model="form" label-width="100px">
      <el-form-item label="提货单号">
        <el-input class="w500" v-model="form.pick_up_code"></el-input>
      </el-form-item>
      <el-form-item label="证书ID">
        <el-input class="w500" v-model="form.certificate_id"></el-input>
      </el-form-item>
      <el-form-item label="证书ID">
        <el-input class="w500" v-model="form.certificate_name"></el-input>
      </el-form-item>
      <el-form-item label="用户ID">
        <el-input class="w500" v-model="form.user_id"></el-input>
      </el-form-item>
      <el-form-item label="提货原因">
        <el-input class="w500" type="textarea" v-model="form.reason"></el-input>
      </el-form-item>
      <el-form-item label="订单类型">
        <el-input class="w500" v-model="form.order_type"></el-input>
      </el-form-item>
      <el-form-item label="收货人名称">
        <el-input class="w500" v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label="收货人电话">
        <el-input class="w500" v-model="form.phone"></el-input>
      </el-form-item>
      <el-form-item label="收货人地址">
        <el-input class="w500" v-model="form.address"></el-input>
      </el-form-item>
      <el-form-item label="物流公司编码">
        <el-input class="w500" v-model="form.logistics_company_code"></el-input>
      </el-form-item>
      <el-form-item label="物流公司名称">
        <el-input class="w500" v-model="form.logistics_company_name"></el-input>
      </el-form-item>
      <el-form-item label="运单号">
        <el-input class="w500" v-model="form.waybill_number"></el-input>
      </el-form-item>
      <el-form-item label="发货状态">
        <el-radio-group v-model="form.transfer_status">
          <el-radio :label="0">未发货</el-radio>
          <el-radio :label="1">已发货</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="申请提货时间">
        <el-input class="w500" v-model="form.create_time"></el-input>
      </el-form-item>
      <el-form-item label="发货时间">
        <el-input class="w500" v-model="form.shipments_time"></el-input>
      </el-form-item>
      <el-form-item label="收货时间">
        <el-input class="w500" v-model="form.pick_up_time"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button @click="goBack">返回</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import { mapState } from 'vuex'

  export default {
    data: function () {
      return {
      }
    },
    computed: {
      ...mapState({
        form: state => state.certificate.saveData
      })
    },
    mounted () {
      this.form.is_pick = String(this.form.is_pick)
      this.form.is_recommend = String(this.form.is_recommend)
      this.form.apply_invalid = String(this.form.apply_invalid)
      this.form.is_transfer = String(this.form.is_transfer)
      this.form.status = String(this.form.status)
    },
    methods: {
      goBack () {
        this.$router.go(-1)
      }
    }
  }
</script>
